import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  mode: 'history',
  routes: [
    {
      path: '/',
      redirect: '/basic'
    },
    {
      path: '/basic',
      component: resolve => require(['components/basic/basic'], resolve),
      children: [
        {
          path: 'productTest',
          component: resolve => require(['components/pages/productTest'], resolve),
          children: [
            {
              path: 'insert',
              name: 'insert',
              component: resolve => require(['base/productTest/insert'], resolve)
            },
            {
              path: 'update/:productTestId',
              name: 'update',
              component: resolve => require(['base/productTest/update'], resolve)
            },
            {
              path: 'query',
              name: 'query',
              component: resolve => require(['base/productTest/query'], resolve)
            },
            {
              path: 'show/:productTestId',
              name: 'show',
              component: resolve => require(['base/productTest/show'], resolve)
            }
          ]
        }
      ]
    },
    {
      path: '/extension',
      component: resolve => require(['components/extension/extension'], resolve)
    }
  ]
})
